package cn.wolfcode._IOday01_.text001;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Text01 {
    public static void main(String[] args) {
        Point<String> p1 = new Point<>();
        Point<String> p2 = new Point<>();
        Point<String> p3 = new Point<>();
        Point<String> p4 = new Point<>();
        Point<String> p5 = new Point<>();
        List<Point<String>> list = new ArrayList<>();
        list.add(p1);
        list.add(p2);
        list.add(p3);
        list.add(p4);
        list.add(p5);
        //System.out.println("list = " + list);
        list.remove(2);
        list.get(3).setX("3");
        list.get(3).setY("3");
        //System.out.println(list);
        Iterator<Point<String>> iterator = list.iterator();
        while (iterator.hasNext())
        {
            Point<String> next = iterator.next();
            System.out.println(next);
        }
    }
}
